import { connect } from "react-redux";
import { Component } from "react";
import {RecommendWrapper,RecommendItem}from '../style'

class Recommend extends Component {
    render(){
        const {list} = this.props;
        return (
            <RecommendWrapper>
                {
                    list.map((item)=>(
                        <RecommendItem key={item.get('id')} imgUrl={item.get('imgUrl')} ></RecommendItem>
                    ))
                }
            </RecommendWrapper>
        )
    }
}

const mapState = (state) => {
    return {
        list:state.get('home').get('recommendList')
    }
}

export default connect(mapState)(Recommend);